package com.shuqi.controller;

import android.content.Context;

import com.shuqi.activity.LabelListActivity;
import com.shuqi.interfaces.IEventListener;
import com.shuqi.model.LabelListModel;

/**
 * 标签列表分控
 * 
 * @author zhuchen
 * 
 */
public class LabelListController extends ControllerBase {
    private LabelListActivity context;
    private LabelListModel model;

    public LabelListController(Context context) {
        this.context = (LabelListActivity) context;
        this.model = new LabelListModel(context);
    }

    @Override
    public void addEventListener(IEventListener listener) {
        // TODO Auto-generated method stub
        model.addEventListener(listener);
    }

    @Override
    public void handle(int eventType, Object... objs) {
        // TODO Auto-generated method stub
        switch (eventType) {
            case EVENT_LOADPAGE:
                model.loadData(objs);
                break;

            default:
                break;
        }
    }

    @Override
    public void onDestroy() {
        // TODO Auto-generated method stub
        model.onDestroy();
    }

}
